/*
 * @Description: TestTeacher 测试类
 * @Author: rendc
 * @Date: 2024-09-10 10:37:50
 * @LastEditors: rendc
 * @LastEditTime: 2024-09-10 11:17:09
 */
public class TestTeacher{
  // main
  public static void main(String[] args){
    // System.out.println("TestTeacher");
    // 使用无参构造器创建第一个对象
    Teacher t1 = new Teacher();
    t1.setName("张三");
    t1.setGender('男');
    t1.setId("001");
    // System.out.println("t1.getId(): " + t1.getId()); 
    // System.out.println("t1.getGender(): " + t1.getGender()); 
    // System.out.println("t1.getName(): " + t1.getName()); 
    t1.sayHello();
    // 使用 两参 构造器创建第 2 个对象
    Teacher t2 = new Teacher("李四","002");
    t2.setGender('男');
    t2.sayHello();
    // 使用 三参 构造器创建第 3 个对象
    Teacher t3 = new Teacher("王五","003",'女');
    t3.sayHello();
  }
}
